Enterprises as well as individuals are becoming increasingly dependent on computers. As more and more data are generated, the need for efficient and reliable filesystems is increasing. There are a variety of filesystems in existence today, utilizing both local and remote storage. Some filesystems use both an originating filesystem and a replica filesystem in order to ensure the safety of the data by copying the data from the local to the replica system. Some replica filesystems include data versioning, enabling recovery of the state of the originating filesystem at multiple previous points in time by including multiple versions of the originating data. Each version of the data may comprise a complete version of the data, or each version of the data may comprise an incremental version of the data, describing changes to the data since the previous version was stored. Some systems create a full backup at regularly scheduled intervals (e.g., once a week, once a month) and create incremental backups at points between the full backups. When it is desired to restore a complete version of the data at a time when only an incremental backup was made, the system must first create a restore list of the data segments comprising the complete version. The data segments may come from a full backup and one or more incremental backups. The system must determine what data is current and what data has been superseded by data in later incremental backups. A previous approach to this problem involves building the entire directory structure in memory from a full backup and modifying it with the changes described in each incremental backup until the desired version has been reached. Once the up-to-date directory structure has been created in memory, it is traversed to create the restore list. This approach is slow and memory-intensive. In some cases, given the size of current storage systems, the creation of the up-to-date directory structure exceeds the memory capacity of the system and causes a crash.